<?php
  $id = $_GET["Id"];
  $sql ="select * from `article` where Id=$id";
  $conn = new mysqli('localhost','root','','mybolg');
  $rs = $conn->query($sql);
  if ($conn->connect_error) 
  die("连接失败: " . $conn->connect_error);
  //var_dump($sql);
  $detail = $rs->fetch_assoc();
?>
<!doctype html>
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
</head>
<style>

body {
  font-family: Arial;
  padding: 0px;
  background: #f1f1f1;
}
.container{
  
  border: 1px solid black;
  width: 800px;
  height: 600px;
  border-radius: 20px;
  box-sizing: border-box;
  margin-left: 200px;
}
.title{
  height:100px;
  text-align: center;
}
.title h1{
  text-align:center;
  text-decoration: underline;
}
.content{
  text-align:center;
  height: 450px;
}
.content p{
  text-align: center;
  height: 400px;
}
.content a{
  background-color: white;
  border: 1px solid black;
  border-radius: 14px;
  color: black;
  -webkit-transition-duration: 0.4s;
  transition-duration: 0.4s;
  padding: 5px 10px;
  text-decoration: none;
  display: inline-block;
}
.content a:hover{
  background-color: #4CAF50;
  color: red;
}

  </style>
<body>
		<div class="container">
			<div class="title">
        <h1> <?php echo $detail['Title']; ?></h1>
      </div>
<hr/>
		    <div class="content">
          <p><?php echo $detail['Content']; ?></p>

						<a href="news.php">返回</a>
      </div>
		</div>
	
</body>
</html>